<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@include file="/pageRc/common/common.jsp"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>用户中心</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../../res/layui/css/layui.css">
  <link rel="stylesheet" href="../../res/css/global.css">
</head>
<body>

<div class="header">
  <div class="main">
    <a class="logo"  title="Fly">
    	<img src="<%=commonPath %>/res/images/logo.png">
    </a> 
    <div class="nav"> 
    </div>
    
    <div class="nav-user">      
      <!-- 登入后的状态 -->
       
      <div class="nav">
         <a  ><i class="iconfont icon-shezhi"></i>hi,${userName},你好</a>
        <a href="javascript:logout()"><i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>退了</a>
      </div>
      
    </div>
  </div>
</div>
<c:if test="${state == '00' }">
	<h2 style="text-align: center;font-size:20px">待审核中...</h2>
</c:if>
<c:if test="${state == '01' }">
<div class="main fly-user-main layui-clear">
  <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
  	 <c:forEach items="${funcList}" var="func" >
  	   <li class="layui-nav-item <c:if test="${func.funcId == '101'}"> layui-this  </c:if>">
	     <a href="<%=commonPath %>/${func.funcUrl}">
	       <i class="layui-icon">${func.funcIcon}</i> ${func.funcNa}
	     </a>
	   </li>  
     </c:forEach>  
  </ul>  
  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>  
  <div class="fly-panel fly-panel-user" pad20> 
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li data-type="mine-jie" lay-id="index" class="layui-this">待办任务（<span>${taskSize}</span>）</li>
        <li data-type="collection" lay-id="collection">领取任务（<span>${noTaskSize}</span>）</li>
      </ul>
      <div class="layui-tab-content" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <ul class="mine-view jie-row">
            <c:forEach items="${taskList}" var="task" >
		        <li>
		        
	              <a class="jie-title" href="<%=commonPath %>/page/base/${task.needId}/doTaskHaving.do" target="_blank"> ${task.needNo}，${task.needName}</a>
	              <i>${task.createDate}</i>
	              <a class="mine-edit" href="<%=commonPath %>/page/base/${task.needId}/doTaskHaving.do">报工</a> 
	              <em>${task.needCnt}</em>
	            </li>
 	       </c:forEach>
          </ul>
          <div id="LAY_page"></div>
        </div>
        
        <div class="layui-tab-item">
          <ul class="mine-view jie-row">
         		<li>  
	              <a class="jie-title" style="color:red" href="<%=commonPath %>/page/base/searchTeanByUser.do" target="_blank">若下面列表中没有，请点击我搜索</a>
 	            </li>
              <c:forEach items="${noTaskList}" var="task" >
		        <li>
	              <a class="jie-title" <c:if test="${task.state == '01'}">href="<%=commonPath %>/page/base/${task.needId}/doTaskHaving.do"</c:if> target="_blank">${task.needNo}，${task.needName}</a>
	              <i> </i>
	              <a class="mine-edit" <c:if test="${task.state == '01'}">href="<%=commonPath %>/page/base/${task.needId}/doTaskHaving.do"</c:if>><c:if test="${task.state == '01'}">领取</c:if><c:if test="${task.state == '00'}">待审核</c:if></a>
 	            </li>
 	       </c:forEach>
          </ul>
          <div id="LAY_page1"></div>
        </div>
      </div>
    </div>
  </div>
</div> 
</c:if>
<a href="<%=commonPath %>/newPro/cap/index.jsp#/dologin_details" target="_blank">
	<div class="doLogin-bt">
	 	<img src="<%=commonPath %>/newPro/cap/static/images/icon_01.png" alt="">
	</div>
</a>
<script src="../../res/layui/layui.js"></script>
<script>
layui.cache.page = 'user';

layui.config({
  version: "2.0.0"
  ,base: '../../res/mods/'
}).extend({
  fly: 'index'
}).use('fly');
</script>

<script type="text/javascript">
	function logout(){
		  layer.confirm("退出表示即将解除绑定，请问你是否还要继续进行该操作？",{icon:3,title:"提示"},function(index){
			  <%--<%=commonPath %>/page/login/login.do--%>
			  //alert("1");
			  window.location.href="<%=commonPath %>/page/login/login.do";
		  });
	}
</script>
</body>
</html>